<!DOCTYPE>
<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib uri="/struts-tags" prefix="s"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="Keywords" content="新锐网">
<meta name="description" content="描述描述描述" />
<%@include file="/WEB-INF/base/commRoot.jsp"%>
<script type="text/javascript" src="/js/jquery.js"></script>
<script type="text/javascript" src="/js/jquery-1.11.1.min.js"></script>
<script type="text/javascript" src="/js/jquery.validate.js"></script>
<script type="text/javascript" src="/js/win_layer/win_layer.js"></script>
<script type="text/javascript" src="/js/My97DatePicker/WdatePicker.js"></script>
<script type="text/javascript" src="/js/view/news/news.js"></script>
<script type="text/javascript" src="/js/view/news/newsinfo.js"></script>
<title>新锐网</title>
<style>.nav_r{ display:block;}
.nav_r a,
.nav_r span,
.nav_r em{ display:inline-block;}

.news_in_list .zan, .news_in_list .zan_has {
    width: 18px;
    height: 18px;
    display: block;
    background: transparent url("/images/news_list_icon.gif") no-repeat scroll 0px -60px;
    float: left;
    color: #F00;
}

.news_in_list .news_con_dd .p_14 {overflow: visible;}


.news_in_tab{ height:52px; width:1090px; margin:0 auto;}
.news_in_tab span{ float:left; width:103px; height:42px; margin-right:10px;}
.news_in_tab span a{ width:103px; height:42px; line-height:34px; display:block; text-align:center; font-size:16px; color:#444; background:url(/images/news_tab.png) no-repeat;}





</style>
</head>
<body>
<!--header-->
<%@include file="/head.jsp"%>
<!--/header-->
<!--main-->
<div class="main_bg">
	<ul id="tab_news" class="news_in_tab">
        <li class="fli"><a href="javascript:void(0);">圈子动态</a></li>
        <li ><a href="javascript:void(0);">特别关注</a></li>
        <li><a href="javascript:void(0);">校内活动</a></li>
        <li><a href="javascript:void(0);">校外活动</a></li>
        
        <span style="float:right;" ><a href="javascript:toAddNewsInfo();" class="btn2" >我要发布</a></span>
    </ul>
    <form name="queryForm" id="queryForm" action="<s:url value="/news/newsCenterAction_newsCenterPage.action"/>" method="post">
    <div id="tab_con_news" class="news_in_con">
        <!--头条新闻-->
        <div class="fdiv ttxw">
        	<s:if test="newsInfo.type == 0">
        	<s:iterator value="page.records" id="news" status="rowstatus">
            <dl class="news_in_list clearfix">
                <dt><a href="${root }/newsInfo/<s:property value='#news.newsId'/>_<s:property value='#news.type'/>.html" target="_blank">
                	<img src="<s:if test='#news.picFileName ==null || #news.picFileName=="" || #news.picFileName==" "'>/images/logo_1.jpg</s:if><s:else><s:property value="cdn_url" /><s:property value="#news.picFileName" /></s:else>"></a></dt>
                <dd class="news_con_dd">
                	<input name="newsSign" value="<s:property value='#news.newsId' />_<s:property value='#news.type'/>" type="hidden"/>
                    <h3><a href="javascript:showNewsDetail('<s:property value="#news.newsId" />','<s:property value="#news.type" />')" >
                     <s:if test="%{null!=#news.title&&#news.title.length()>30}">
                         <s:property value="%{#news.title.substring(0, 30)}"/>...
                         </s:if>
                         <s:else>
                         <%-- <span><s:property value="#news.title" /></span> --%>
                         <s:property value="#news.title" />
                         </s:else>
                    </a></h3>
                    <p class="p_14">
                         <s:if test="%{null!=#news.summary&&#news.summary.length()>180}">
                         <s:property value="%{#news.summary.substring(0, 180)}"/>...
                         </s:if>
                         <s:else>
                         <span><s:property value="#news.summary" /></span>
                         </s:else>
                    	
                    	<a href="javascript:void(0);" onclick="showNewsDetail('<s:property value="#news.newsId" />','<s:property value="#news.type" />')" >[详细]</a>
                    </p>
                </dd>
               <dd class="news_con_r">
                	<div class="news_active jiathis_style">
<!-- 	                	<input type="hidden" value="${notice.isApprove}" id="${notice.id}_isApprove"/> -->
                    	<a href="javascript:void(0);" class="news_share jiathis" id="news_share_a"></a>
                    	<a href="javascript:addNewsPraise('<s:property value="#news.newsId" />', '<s:property value="#news.type" />');" 
                    		title="赞" class="zan" id="<s:property value='#news.newsId' />_zan"><!--已赞调用zan_has-->
                        	<i class="zan_icon"></i>
                            <span class="zan_views"><s:property value='#news.praise' /></span>
                        </a>
                    </div>
                    <p class="news_date">发布日期：<br/><span><s:date name="#news.createTime" format="yyyy-MM-dd" /></span></p>
                </dd>
                
                <s:if test="#news.recommend == 1"><dd class="icon_recommend"> 荐 </dd></s:if>
                
            </dl>
            </s:iterator>
            </s:if>
        </div>
        <!--理财课堂-->
        <div class="lckt">
        	<s:if test="newsInfo.type == 1">
        	<s:iterator value="page.records" id="news" status="rowstatus">
            <dl class="news_in_list clearfix">
                <dt><a href="${root }/newsInfo/<s:property value='#news.newsId'/>_<s:property value='#news.type'/>.html"  target="_blank">
                	<img src="<s:if test='#news.picFileName ==null || #news.picFileName=="" || #news.picFileName==" "'>/images/logo_1.jpg</s:if><s:else><s:property value="cdn_url" /><s:property value="#news.picFileName" /></s:else>"></a></dt>
                <dd class="news_con_dd">
                	<input name="newsSign" value="<s:property value='#news.newsId' />_<s:property value='#news.type'/>" type="hidden"/>
                    <h3><a href="javascript:void(0);" onclick="showNewsDetail('<s:property value="#news.newsId" />','<s:property value="#news.type" />')" >
                    <s:if test="%{null!=#news.title&&#news.title.length()>30}">
                         <s:property value="%{#news.title.substring(0, 30)}"/>...
                         </s:if>
                         <s:else>
                         <s:property value="#news.title" />
                         </s:else>
                    </a></h3>
                    <p class="p_14">
                    <s:if test="%{null!=#news.summary&&#news.summary.length()>180}">
                         <s:property value="%{#news.summary.substring(0, 180)}"/>...
                         </s:if>
                         <s:else>
                         <span><s:property value="#news.summary" /></span>
                         </s:else>
                    <a href="javascript:showNewsDetail('<s:property value="#news.newsId" />','<s:property value="#news.type" />');;">[详细]</a></p>
                </dd>
                <dd class="news_con_r">
                	<div class="news_active jiathis_style">
<!-- 	                	<input type="hidden" value="${notice.isApprove}" id="${notice.id}_isApprove"/> -->
                    	<a href="javascript:void(0);" class="news_share jiathis" id="news_share_a"></a>
                    	<a href="javascript:addNewsPraise('<s:property value="#news.newsId" />', '<s:property value="#news.type" />');" 
                    		title="赞" class="zan" id="<s:property value='#news.newsId' />_zan"><!--已赞调用zan_has-->
                        	<i class="zan_icon"></i>
                            <span class="zan_views"><s:property value='#news.praise' /></span>
                        </a>
                    </div>
                    <p class="news_date">发布日期：<br/><span><s:date name="#news.createTime" format="yyyy-MM-dd" /></span></p>
                </dd>
                
                <s:if test="#news.recommend == 1"><dd class="icon_recommend"> 荐 </dd></s:if>
                
            </dl>
            </s:iterator> 
            </s:if>
        </div>
        <!--站内公告-->
        <div class="zngg">
       		<s:if test="newsInfo.type == 2">
        	<s:iterator value="page.records" id="news" status="rowstatus">
            <dl class="news_in_list clearfix">
                <dt><a href="${root }/newsInfo/<s:property value='#news.newsId'/>_<s:property value='#news.type'/>.html" target="_blank">
                	<img src="<s:if test='#news.picFileName ==null || #news.picFileName=="" || #news.picFileName==" "'>/images/logo_1.jpg</s:if><s:else><s:property value="cdn_url" /><s:property value="#news.picFileName" /></s:else>"></a></dt>
                <dd class="news_con_dd">
                	<input name="newsSign" value="<s:property value='#news.newsId' />_<s:property value='#news.type'/>" type="hidden"/>
                    <h3><a href="javascript:void(0);" onclick="showNewsDetail('<s:property value="#news.newsId" />','<s:property value="#news.type" />')" >
                    <s:if test="%{null!=#news.title&&#news.title.length()>30}">
                         <s:property value="%{#news.title.substring(0, 30)}"/>...
                         </s:if>
                         <s:else>
                         <s:property value="#news.title" />
                         </s:else>
                    </a></h3>
                    <p class="p_14">
                    <s:if test="%{null!=#news.summary&&#news.summary.length()>180}">
                         <s:property value="%{#news.summary.substring(0, 180)}"/>...
                         </s:if>
                         <s:else>
                         <span><s:property value="#news.summary" /></span>
                         </s:else>
                    <a href="javascript:void(0);" onclick="showNewsDetail('<s:property value="#news.newsId" />','<s:property value="#news.type" />')">[详细]</a></p>
                </dd>
                <dd class="news_con_r">
                	<div class="news_active jiathis_style">
                    	<a href="javascript:void(0);" class="news_share jiathis" id="news_share_a"></a>
                    	<a href="javascript:addNewsPraise('<s:property value="#news.newsId" />', '<s:property value="#news.type" />');" 
                    		title="赞" class="zan" id="<s:property value='#news.newsId' />_zan"><!--已赞调用zan_has-->
                        	<i class="zan_icon"></i>
                            <span class="zan_views"><s:property value='#news.praise' /></span>
                        </a>
                    </div>
                    <p class="news_date">发布日期：<br/><span><s:date name="#news.createTime" format="yyyy-MM-dd" /></span></p>
                </dd>
                
                <s:if test="#news.recommend == 1"><dd class="icon_recommend"> 荐 </dd></s:if>
                
            </dl>
            </s:iterator> 
            </s:if>
    	</div>
    	
    	<!--站内公告-->
        <div class="xiaowaihuodong">
       		<s:if test="newsInfo.type == 3">
        	<s:iterator value="page.records" id="news" status="rowstatus">
            <dl class="news_in_list clearfix">
                <dt><a href="${root }/newsInfo/<s:property value='#news.newsId'/>_<s:property value='#news.type'/>.html" target="_blank">
                	<img src="<s:if test='#news.picFileName ==null || #news.picFileName=="" || #news.picFileName==" "'>/images/logo_1.jpg</s:if><s:else><s:property value="cdn_url" /><s:property value="#news.picFileName" /></s:else>"></a></dt>
                <dd class="news_con_dd">
                	<input name="newsSign" value="<s:property value='#news.newsId' />_<s:property value='#news.type'/>" type="hidden"/>
                    <h3><a href="javascript:void(0);" onclick="showNewsDetail('<s:property value="#news.newsId" />','<s:property value="#news.type" />')" >
                    <s:if test="%{null!=#news.title&&#news.title.length()>30}">
                         <s:property value="%{#news.title.substring(0, 30)}"/>...
                         </s:if>
                         <s:else>
                         <s:property value="#news.title" />
                         </s:else>
                    </a></h3>
                    <p class="p_14">
                    <s:if test="%{null!=#news.summary&&#news.summary.length()>180}">
                         <s:property value="%{#news.summary.substring(0, 180)}"/>...
                         </s:if>
                         <s:else>
                         <span><s:property value="#news.summary" /></span>
                         </s:else>
                    <a href="javascript:void(0);" onclick="showNewsDetail('<s:property value="#news.newsId" />','<s:property value="#news.type" />')">[详细]</a></p>
                </dd>
                <dd class="news_con_r">
                	<div class="news_active jiathis_style">
                    	<a href="javascript:void(0);" class="news_share jiathis" id="news_share_a"></a>
                    	<a href="javascript:addNewsPraise('<s:property value="#news.newsId" />', '<s:property value="#news.type" />');" 
                    		title="赞" class="zan" id="<s:property value='#news.newsId' />_zan"><!--已赞调用zan_has-->
                        	<i class="zan_icon"></i>
                            <span class="zan_views"><s:property value='#news.praise' /></span>
                        </a>
                    </div>
                    <p class="news_date">发布日期：<br/><span><s:date name="#news.createTime" format="yyyy-MM-dd" /></span></p>
                </dd>
                
                <s:if test="#news.recommend == 1"><dd class="icon_recommend"> 荐 </dd></s:if>
                
            </dl>
            </s:iterator> 
            </s:if>
    	</div>
    	
    	
    	
    	
   		 <div class="clearfix">
              <p class="page r">
				<%@include file="/WEB-INF/base/page.jsp"%>
				<input type="hidden" id="pageNo" name="pageNo" value="<s:property value="#page.currentPage"/>" />
				<s:hidden name="newsInfo.type" id="newsInfotype"></s:hidden>
			</p>
        </div>
        
        
       
	</div>
     </form>
     
</div>
<!--/main-->
<!--footer-->

<!--/footer-->

<script type="text/javascript">
//定义分享配置初始化变量
var jiathis_config = {};
var id = "";
var types = "";
	$(function(){
		var newsType = '<s:property value="%{newsInfo.type}"/>';
		var tInd = newsType;
		  	$('#tab_news li').removeClass('fli').eq(tInd).addClass('fli');
		  	$('#tab_con_news > div').removeClass('fdiv').eq(tInd).addClass('fdiv');
		  
			  $('#tab_news li').click(function(){
				  var i = $(this).index();
				  $("#newsInfotype").val(i);
				  $("#pageNo").val(1);
				  var form = document.forms[0];
				  form.submit();
			  });

		
		  /**
		   * 设置分享内容
		   */
		  $(".news_con_r").hover(function(){
		  	var title = $(this).parent().find("dd:first").find("h3 a").html();
		  	var summary = $(this).parent().find("dd:first").find("p span").html();
		  	var url = $(this).parent().find("dt:first").find("a").attr("href");
		  	var pic = $(this).parent().find("dt:first").find("a img").attr("src");
		 
		  	var newid = $(this).parent().find("dd:first").find("input").val();
		  	var newsMes = new Array(); 
		  	newsMes = newid.split("_");
			id = newsMes[0];
			types = newsMes[1];
		 	jiathis_config.url = getHostPath() + url;
		  	jiathis_config.title = title.trim();
		  	jiathis_config.summary = summary.trim();
		 	jiathis_config.pic = pic;
		 	jiathis_config.evt={"share":"rewardShare"};//分享成功打开新闻详情页
		  });
	});

  //点击分享延时打开详情页面
  function rewardShare(){
	  setTimeout("showNewsDetail("+id+","+types+")", 15000);
  }

</script>
</body>
</html>
